package com.cloudkinto.controller.product;


import com.cloudkinto.base.BaseController;
import com.cloudkinto.common.annotations.UserSessionRequired;
import com.cloudkinto.common.web.SingleResult;
import com.cloudkinto.service.product.ProductCategoryService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.*;

/**
 * <p>
 * 产品分类 前端控制器
 * </p>
 *
 * @author long
 * @since 2024-10-29
 */
@RestController
@RequiredArgsConstructor
@Api(tags = "wms产品分类")
@RequestMapping("/api/admin/wms/productCategory")
public class ProductCategoryWmsController extends BaseController {

    private final ProductCategoryService productCategoryService;

    @UserSessionRequired
    @GetMapping("/getCategoryTree")
    @ApiOperation(value = "产品分类树查询", notes = "产品分类树查询")
    public SingleResult getCategoryTree() {
        return SingleResult.success("查询成功", productCategoryService.getCategoryTree(getTenantId()));
    }
}

